package com.hs.egova.controller;

import com.hs.egova.anno.SysLog;
import com.hs.egova.base.ResultInfo;
import com.hs.egova.mapping.User;
import com.hs.egova.service.UserManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author husheng
 * @version v1.0
 * @date 2021/7/19 19:01
 * @email husheng@egova.com.cn
 */
@RestController
@RequestMapping("/test")
@Api(tags = "测试用户信息")
public class IndexController {

    @Autowired
    private UserManager userManager;
    /**
     *  返回加工后的姓名
     * @param name
     * @return
     */
    @SysLog("获取姓名")
    @GetMapping("/{name}")
    @ApiOperation("获取加工姓名")
    public ResultInfo testUser(@PathVariable String name) {

        ResultInfo resultInfo = userManager.getUserByCustom(name);
        return resultInfo;
    }
}
